import oracle = require("oracledb");
import dbConfig = require("../config/dbConfig");

let config = dbConfig.config;

oracle.getConnection(
    {
        user: config.user,
        password: config.password,
        connectString: config.connectString
    },
    function (err, connection) {
        if (err) {
            console.error(err.message);
            return;
        }
        connection.execute(
            "update TNMS.T_USER set description = :description "
            +"where id = :id",
            ["胡燕龙","huyl"],
            function (err, result) {
                if (err) {
                    console.error(err.message);
                    return;
                }
                // 提交更改
                connection.commit();
            });
    });